<template>
    <el-card>
        <template #header>
            <div class="card-header">
                <span>评论列表</span>
            </div>
        </template>
        <el-table :data="tableData" style="width: 100%">
            <el-table-column prop="id" label="#" width="40" />
            <el-table-column prop="article_title" label="标题" width="" />

            <el-table-column prop="user_nickname" label="用户" width="" />
            <el-table-column prop="content" label="留言内容" width="" />
            <el-table-column prop="create_time" label="日期" width="" />
            <el-table-column prop="active" label="操作">
                <el-button type="primary" plain size="small">
                    <el-icon>
                        <Edit />
                    </el-icon>回复
                </el-button>
                <el-button type="danger" plain size="small">
                    <el-icon>
                        <Delete />
                    </el-icon>隐藏
                </el-button>

            </el-table-column>
        </el-table>
    </el-card>
</template>
<script setup>
import { ref, reactive } from 'vue';
import Comment from '@/api/comment.js'
let tableData = ref([

]);
async function loadList() {
    let { status, data } = await Comment.list();
    if (status) {
        tableData.value = data;
        console.log(data)
    }
}
loadList();
</script>
